// Copyright  2004-2008 Backplane Ltd.
//
// This file is part of RegistryLookup
//
// RegistryLookup is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
//
// RegistryLookup is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License
// along with RegistryLookup. If not, see <http://www.gnu.org/licenses/>.

//	
//
//	Purpose: Declaration of the CFileInfo
//   $Id$

#pragma once
#include "resource.h"       // main symbols

#include "RegistryLookup.h"


// CFileInfo

class ATL_NO_VTABLE CFileInfo : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CFileInfo, &CLSID_FileInfo>,
	public ISupportErrorInfo,
	public IDispatchImpl<IFileInfo, &IID_IFileInfo, &LIBID_RegistryLookupLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
	CFileInfo()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_FILEINFO)


BEGIN_COM_MAP(CFileInfo)
	COM_INTERFACE_ENTRY(IFileInfo)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()

// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

public:

	STDMETHOD(mimeTypeFromExtension)(BSTR extension, BSTR * pbsmimetype);
};

OBJECT_ENTRY_AUTO(__uuidof(FileInfo), CFileInfo)
